﻿using System;
using HttpApiGateway.Config;
using HttpApiGateway.Interface;

namespace HttpApiGateway
{
    internal class DefModular : IApiModular
    {
        private readonly string _AssemblyName;
        public DefModular(Type type)
        {
            this._AssemblyName = type.Assembly.FullName;
            this.ServiceName = type.Assembly.GetName().Name;
            this.Config = new ModularConfig();
        }
        public IModularConfig Config
        {
            get;
        }

        public string ServiceName { get; }

        public string ApiRouteFormat => this.Config.ApiRouteFormat;

        public bool CheckIsContain(Type type)
        {
            return type.Assembly.FullName == this._AssemblyName;
        }

        public void Dispose()
        {

        }

        public void InitModular()
        {

        }

        public void Start()
        {

        }
    }
}
